package com.wy.schedule;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class MyTask {

    @Scheduled(fixedDelay = 1000)
    public void task1(){
        System.out.println(Thread.currentThread().getName()+" task1----");
    }
}
